package com.neuedu.corejava.ch7.homeword;
//20190805
import java.util.Scanner;

public class Gardener {
	
	public Fruits create(){
		Scanner scanner=new Scanner(System.in);
		String name=scanner.next();
		Fruits fruits=null;
		switch (name) {
		case "苹果":
			fruits=new Apple();
			break;
		case "香蕉":
			fruits=new Banana();
			break;
		case "葡萄":
			fruits=new Grape();
			break;
		}
		return fruits;
		
	}
	
	public static void main(String[] args) {
		Gardener gardener=new Gardener();
		gardener.create();
		
	}

}
